package com.qf.test.test.pojo;

public class Address {
    private String addr;
    //重写构造方法  利用构造方法进行注入


    public Address(String addr) {

        this.addr = addr;
    }

    public String getAddr() {
        return addr;
    }

    public void setAddr(String addr) {
        System.out.println("setAddr注入方法执行了");
        this.addr = addr;
    }

    @Override
    public String toString() {
        return "Address{" +
                "addr='" + addr + '\'' +
                '}';
    }
}
